package cn.microven.mindmap.controller.menu;

import cn.microven.mindmap.struture.MindMap;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Menu;
import javafx.scene.layout.AnchorPane;

import java.net.URL;
import java.util.ResourceBundle;

public class OperationMenu implements Initializable {

    @FXML
    public AnchorPane redo;

    @FXML
    public AnchorPane undo;

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        redo.setOnMouseClicked((mouseEvent -> {
            MindMap.redo();
        }));

        undo.setOnMouseClicked((mouseEvent -> {
            MindMap.undo();
        }));
    }
}
